package com.eco.fanliapp.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eco.fanliapp.dao.AppUserRewardSetupMapper;
import com.eco.fanliapp.entity.AppUserRewardSetup;
import com.eco.fanliapp.service.IAppUserRewardSetupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AppUserRewardSetupImpl extends ServiceImpl<AppUserRewardSetupMapper, AppUserRewardSetup> implements IAppUserRewardSetupService {
    @Autowired
    private AppUserRewardSetupMapper appUserRewardSetupMapper;

    @Override
    public int addAppUserRewardSetup(AppUserRewardSetup appUserRewardSetup) {
        return appUserRewardSetupMapper.insert(appUserRewardSetup);
    }

    @Override
    public int updateAppUserRewardSetup(AppUserRewardSetup appUserRewardSetup) {
        return appUserRewardSetupMapper.updateById(appUserRewardSetup);
    }

    @Override
    public List<AppUserRewardSetup> selectAppUserRewardSetup() {
        List<AppUserRewardSetup> appUserRewardSetupList =  appUserRewardSetupMapper.selectList();
        return appUserRewardSetupList;
    }

    @Override
    public AppUserRewardSetup getAppUserRewardSetup(int i) {
        return appUserRewardSetupMapper.selectByPrimaryKey(i);
    }
}
